from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

kw = driver.find_element(By.XPATH,'//input[@id="kw"]')
print(kw.get_attribute('outerHTML'))

s_ipt = driver.find_element(By.XPATH,'//input[@class="s_ipt"]')
print(s_ipt.get_attribute('outerHTML'))

input_lists = driver.find_elements(By.XPATH,'//input')
for ipt in input_lists:
    print(ipt.get_attribute('outerHTML'))

time.sleep(2)
driver.quit()


